home *** CD-ROM | disk | FTP | other *** search
- DSHIFTR(3I) Last changed: 2-5-98
-
-
- NNAAMMEE
- __ddsshhiiffttrr, DDSSHHIIFFTTRR - Performs a double-object right shift
-
- SSYYNNOOPPSSIISS
- C/C++:
-
- ##iinncclluuddee <<iinnttrriinnssiiccss..hh>>
- lloonngg __ddsshhiiffttrr ((lloonngg _i,, lloonngg _j,, lloonngg _k));;
-
- Fortran:
-
- DDSSHHIIFFTTRR (([II==]_i,, [JJ==]_j,, [KK==]_k))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- C/C++: UNICOS and UNICOS/mk systems
-
- Fortran: UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- C/C++: Cray Research extension
-
- Fortran: CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
- 90
-
- DDEESSCCRRIIPPTTIIOONN
- The __ddsshhiiffttrr and DDSSHHIIFFTTRR functions perform a double-object right
- shift. They return a single object.
-
- This result is derived from two arguments, _i and _j. The arguments are
- as follows:
-
- _i The upper bits of the double object. Must be of type integer.
-
- _j The lower bits of the double object. Must be of the same type
- and size as _i.
-
- _k The number of bits to be shifted. Must be of type integer.
-
- The __ddsshhiiffttrr and DDSSHHIIFFTTRR functions return a value generated by a right
- double-shift of the rightmost _k bits of _i into the leftmost _k bits of
- _j. If both the _i and _j arguments specify the same word in memory, a
- rotated shift occurs. The value of _k must be in the range of 0
- through 64 for __ddsshhiiffttrr.
-
- CC//CC++++ NNOOTTEESS
- Because __ddsshhiiffttrr is an intrinsic function, no externally visible
- library function is available for it. The compiler generates inline
- code to produce the result.
-
- FFOORRTTRRAANN NNOOTTEESS
- On UNICOS systems, _i and _j are 64-bit objects. On UNICOS/mk systems,
- _i and _j can be 32- or 64-bit objects. On IRIX systems, _i and _j can be
- 8-, 16-, 32-, or 64-bit objects.
-
- When shifting 64-bit quantities, _i makes up bits 64 through 127 of the
- double object. The function result is the 64-bit string beginning
- with bit 64-_k; that is, its rightmost bit is _k bits from the double
- object's right end. The value of _k must be 0 <= _k <= 64.
-
- When shifting 32-bit quantities, _i makes up bits 32 through 63 of the
- double object. The function result is the 32-bit string beginning
- with bit 32-_k; that is, its rightmost bit is _k bits from the double
- object's right end. The value of _k must be 0 <= _k <= 32.
-
- When shifting 16-bit quantities, _i makes up bits 16 through 31 of the
- double object. The function result is the 16-bit string beginning
- with bit 16-_k; that is, its rightmost bit is _k bits from the double
- object's right end. The value of _k must be 0 <= _k <= 16.
-
- When shifting 8-bit quantities, _i makes up bits 8 through 15 of the
- double object. The function result is the 8-bit string beginning with
- bit 8-_k; that is, its rightmost bit is _k bits from the double object's
- right end. The value of _k must be 0 <= _k <= 8.
-
- Arguments are not altered in their original storage unless the result
- represents the same address as either _i or _j, as in the Fortran
- assignment MM == DDSSHHIIFFTTRR((MM,, NN,, 55)).
-
- For more information on storage units, see the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e
- _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905.
-
- DDSSHHIIFFTTRR is an elemental function. The name of this intrinsic cannot
- be passed as an argument.
-
- RREETTUURRNN VVAALLUUEESS
- __ddsshhiiffttrr returns a 64-bit integer result.
-
- DDSSHHIIFFTTRR returns a typeless result on UNICOS and UNICOS/mk systems and
- an integer result on IRIX systems. The size of the result is the size
- of the arguments _i and _j.
-
- EEXXAAMMPPLLEESS
- The following figure shows a shift of two 64-bit quantities:
-
- Double word shifts right by _k bits -->
-
- 127 _i 64 63 _j 0
- |___________________________|__________________________|
- |--------result----------|--------_k--------|
-
- SSEEEE AALLSSOO
- A complete list of C/C++ intrinsic functions available on Cray
- Research systems is in the _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication
- SR-2179.
-
- _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905
-
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-